package com.hilinos.base.api.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hilinos.common.common.ReturnCode;
import com.hilinos.common.entity.BaseEntity;
import com.hilinos.common.entity.IBaseVo;
import com.hilinos.common.util.AssertUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class AccountQo extends BaseEntity implements IBaseVo {
    @ApiModelProperty("用户账号")
    @TableField("account_id")
    private String accountId;
    @ApiModelProperty("账户类型;如：微信，小程序等")
    @TableField("account_type")
    private String accountType;
    @ApiModelProperty("用户_id")
    @TableField("user_id")
    private String userId;
    @ApiModelProperty("用户显示名称")
    @TableField("account_display_name")
    private String accountDisplayName;

    @Override
    public void checkParams() {
        AssertUtils.isNotEmpty(userId, ReturnCode.NORMAL_PARAM_LOST_ERROR.respMsg("用户id不能为空"));
        AssertUtils.isNotEmpty(accountId, ReturnCode.NORMAL_PARAM_LOST_ERROR.respMsg("账号不能为空"));
        AssertUtils.isNotEmpty(accountType, ReturnCode.NORMAL_PARAM_LOST_ERROR.respMsg("账号类型不能为空"));
    }
}
